home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / UTIL / SPLITFIL.CPP < prev    next >
C/C++ Source or Header  |  1993-12-05  |  493b  |  23 lines

  1. #include "..\au.hpp"
  2. /***********************************************************************/
  3. void split_file(char *full, char *path, char *file_name)
  4. {
  5.     int k=0;
  6.  
  7.     path[0] = '\0';
  8.     for (int j=strlen(full); j>=0; j--)
  9.     {
  10.         if (full[j]=='\\' || full[j]==':' || full[j]=='/')
  11.         {
  12.             while (k <= j)
  13.             {
  14.                 path[k] = full[k];
  15.                 k++;
  16.             }
  17.             path[k] = '\0';
  18.             break;
  19.         }
  20.     }
  21.     strcpy(file_name, full+k);
  22. }
  23.